# coding=utf-8

from .models import User


def block_user(user: User, block_device=False):
    user.is_active = False
    user.save()


def unblock_user(user: User):
    user.is_active = True
    user.save()
